import request from '@/utils/request'

/**
 * 获取项目列表
 */
export function getProjectList(data) {
  return request({
    url: '/eproject/GetProjectList',
    method: 'post',
    data
  })
}

export function addModel(data) {
  return request({
    url: '/eproject/AddModel',
    method: 'post',
    data
  })
}

export function updateModel(data) {
  return request({
    url: `/eproject/UpdateModel`,
    method: 'post',
    data
  })
}

export function deleteModel(id) {
  return request({
    url: `/eproject/DeleteModel?id=` + id,
    method: 'post'
  })
}

export function getDataList(data) {
  return request({
    url: '/eproject/GetDataList',
    method: 'post',
    data
  })
}

export function addData(data) {
  return request({
    url: '/eproject/AddData',
    method: 'post',
    data
  })
}

export function updateData(data) {
  return request({
    url: '/eproject/UpdateData',
    method: 'post',
    data
  })
}

export function deleteData(id, projectId) {
  return request({
    url: `/eproject/DeleteData?id=` + id + '&projectId=' + projectId,
    method: 'get'
  })
}